﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;

namespace SQT.tracnghiem.Ajax.ASP.Staff
{
    public partial class change_role : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request.QueryString["id"]);
            int role = int.Parse(Request.QueryString["role"]);

            var get_manager = new TblManagerController().FetchAll().Where(x => x.ManagerId == id).Single();

            new TblManagerController().Update(get_manager.ManagerId,get_manager.ManagerName,get_manager.ManagerPass,role,get_manager.FullName,get_manager.Birthday,get_manager.Sex,get_manager.Avatar,get_manager.Captain,get_manager.Phone,get_manager.Email,get_manager.Facebook,get_manager.Address,get_manager.Active,get_manager.Wallpaper,get_manager.Note);
        }
    }
}